package com.example.ecommerce.util;

public interface MsgCode {
    MCode SU000 = MSG("SU000", "Success");
    MCode SU001 = MSG("SU001", "新建成功");
    MCode SU002 = MSG("SU002", "保存成功");
    MCode SU003 = MSG("SU003", "删除成功");
    MCode SU004 = MSG("SU004", "更新成功");
    MCode SU005 = MSG("SU005", "操作成功");
    MCode SU006 = MSG("SU006", "提交成功，请耐心等待");
    MCode SU007 = MSG("SU007", "复制成功");

    static MCode MSG(String code, String desc) {
        return new MCode("message", code, desc);
    }

    static MCode LOG(String code, String desc) {
        return new MCode("login", code, desc);
    }

    static MCode DB(String code, String desc) {
        return new MCode("database", code, desc);
    }

    static MCode WF(String code, String desc) {
        return new MCode("workflow", code, desc);
    }

    static MCode VS(String code, String desc) {
        return new MCode("visual", code, desc);
    }

    static MCode GT(String code, String desc) {
        return new MCode("gateway", code, desc);
    }

    static MCode OA(String code, String desc) {
        return new MCode("oauth", code, desc);
    }

    static MCode PS(String code, String desc) {
        return new MCode("permission", code, desc);
    }

    static MCode SCHEDULE(String code, String desc) {
        return new MCode("schedule", code, desc);
    }

    static MCode SYS(String code, String desc) {
        return new MCode("system", code, desc);
    }
}
